//
//  AppDelegate.m
//  LvoeBeen_Imitation
//
//  Created by Mac on 17/2/18.
//  Copyright © 2017年 itcast. All rights reserved.
//

/**
 *  代理逻辑：
 *    1. 显示启动动画效果 （暂不启用）
 *    2. 显示新特性页面
 *    3. 显示 tabBarController
 */

#import "AppDelegate.h"
#import "LBTabBarController.h"
#import "LBADViewController.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
    self.window = [[UIWindow alloc] initWithFrame:ScreenBounds];
    
    //读取用户偏好
    NSString *key = [[NSUserDefaults standardUserDefaults] objectForKey:@"key"];
    
    if ([key isEqualToString:@"1"]) {
         self.window.rootViewController = [LBTabBarController new];
    } else{
         self.window.rootViewController = [LBADViewController new];
    }
//    [self creatTabBarController];
   
   
    
    [self.window makeKeyAndVisible];
    
    
    
    return YES;
}

#pragma mark
#pragma mark - 加载 tabBarController 控制器
- (void) creatTabBarController {
    LBTabBarController *tabBarCtr = [[LBTabBarController alloc] init];
    [UIApplication sharedApplication].keyWindow.rootViewController = tabBarCtr;
}


#pragma mark
#pragma mark - 加载新特性界面
- (void) addNewFeathureWithFirst:(BOOL)isFirstLogin {
    // 传入参数，确认是否为第一次登陆
}

#pragma mark
#pragma mark - 启动动画
- (void) startLanuchScreenAnimation {
    // 启动动画显示效果
    
}



@end
